Validate the direct downloaded template file format (QCOW2) if the template file exists#10332
Conversation
…mplate file exists
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #10332 +/- ##
============================================
- Coverage 16.00% 15.99% -0.01%
- Complexity 13062 13064 +2
============================================
Files 5644 5644
Lines 494915 494920 +5
Branches 59960 59962 +2
============================================
- Hits 79187 79185 -2
- Misses 406891 406897 +6
- Partials 8837 8838 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12356 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12322)
|
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12339)
|
These errors seem consistent. I'm not sure wht the state of 4.20 is right now, though |
|
|
@blueorangutan package |
|
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12398 |
|
@blueorangutan test |
|
@kiranchavala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM, was able to test it with a debugger attached
-
Register a template as direct download
-
Deploy a vm from the Template
-
Get the details of the template local path from the database
mysql > select * from template_spool_ref where template_id=<>;
*************************** 3. row ***************************
id: 3
pool_id: 1
template_id: 203
created: 2025-02-11 08:12:07
last_updated: NULL
job_id: NULL
download_pct: 100
download_state: DOWNLOADED
error_str: NULL
local_path: 53a5bace-b791-4e83-9d30-67848b0df3e5
install_path: 53a5bace-b791-4e83-9d30-67848b0df3e5
template_size: 2147418112
marked_for_gc: 0
state: Ready
update_count: 0
updated: NULL
deployment_option: NULL
- Login to kvm host and delete the template
rm -rf /mnt/d94e3a76-d728-320c-8a27-b0ee6e03757b/53a5bace-b791-4e83-9d30-67848b0df3e5
- During vm deployment cloudstack checks if the qcow2 file exists or not and fails the operation if the
Agent Logs
2025-02-11 08:12:07,293 WARN [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-5:[]) (logid:) Skipped validation whether downloaded file is QCOW2 for template 53a5bace-b791-4e83-9d30-67848b0df3e5, due to downloaded template path is not valid: /mnt/d94e3a76-d728-320c-8a27-b0ee6e03757b/53a5bace-b791-4e83-9d30-67848b0df3e5
2025-02-11 08:17:12,441 DEBUG [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-1:[]) (logid:) Failed to create volume: com.cloud.utils.exception.CloudRuntimeException: Can't find volume:53a5bace-b791-4e83-9d30-67848b0df3e5
at com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.cloneVolumeFromBaseTemplate(KVMStorageProcessor.java:454)
2025-02-11 08:22:22,237 DEBUG [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-2:[]) (logid:) Failed to create volume: com.cloud.utils.exception.CloudRuntimeException: Can't find volume:53a5bace-b791-4e83-9d30-67848b0df3e5
|
[SF] Trillian test result (tid-12369)
|
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
these failures are not related to this PR changes, same results in 4.20 health check as well here: #10006 (comment) (seems to be consistent, as per the above results cc @DaanHoogland @weizhouapache @kiranchavala) |
|
LGTM, thanks for the PR and testing @sureshanaparti @kiranchavala |
|
[SF] Trillian test result (tid-12379)
|
…mplate file exists (apache#10332) * Validate the direct downloaded template file format (QCOW2) if the template file exists * string format not required
Description
This PR validates the direct downloaded template file format (QCOW2) if the template file exists, otherwise skips validation & logs it.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?